package com.hmall.mapper;

import com.hmall.model.SysUserTemp;
import com.hmall.util.MyMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SysUserTempMapper extends MyMapper<SysUserTemp> {
    //暂存的信息插入
    void myInsert(@Param("temp") SysUserTemp sysUserTemp);

    SysUserTemp selectByUserId(@Param("userId") Integer userId);

    int queryStatus(@Param("userId") Integer userId);

    Integer passExam(@Param("temp_id") Integer temp_id, @Param("opinion") String opinion);

    Integer failExam(@Param("temp_id") Integer temp_id, @Param("opinion") String opinion);

    void updateStatus(@Param("tempId") int tempId, @Param("status") int status);

    List<SysUserTemp> selectUnExam();

    List<SysUserTemp> selectUnpassExam();

    List<SysUserTemp> selectPassExam();
    int deleteByUserId(@Param("userId") Integer userId);

}